<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!-- CSS 文件 ，不要删，不够自己添加 -->
<link rel="stylesheet" href="../assets/css/bootstrap.min.css">
<link rel="stylesheet" href="../css/bootstrap-table.min.css">
<link rel="stylesheet" href="../assets/css/azzara.min.css">
<link rel="stylesheet" href="../assets/css/demo.css">
<body>

<!--这里选择的是80%的容器，如果需要100%的话，自己修改一下-->

<div class="container">
    <!--内容在这里面添加就好了-->
    <div style="text-align: right;margin-bottom: 5px;">
        <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal" onclick="" id="addgx">添加工序</button>
        <button class="btn btn-primary btn-sm" onclick="gxdel()" id="delgx">删除工序</button>
        <button class="btn btn-primary btn-sm" onclick="yulan()" id="ylgx">预览</button>
        <button class="btn btn-primary btn-sm" onclick="fanhuiym()">返回</button>
        <button class="btn btn-primary btn-sm" onclick="querenaddgx()" style="display: none" id="qr1">提交</button>
    </div>
    <div class="container-fluid" style="border: 1px solid black;">
        <h1 style="text-align: center;">产品工序设计单</h1>
        <form id="gxfrom">
            <div style="width: 48%;display: inline-block">
                <div class="form-group form-inline">
                    <label class="col-md-3 col-form-label">产品名称:</label>
                    <div class="col-md-9 p-0">
                        <span id="name" name="productName"></span>
                    </div>
                </div>

                <div class="form-group form-inline">
                    <label class="col-md-3 col-form-label">设计人:</label>
                    <div class="col-md-9 p-0">
                        <input class='form-control input-full' name="designer">
                    </div>
                </div>

            </div>
            <div style="width: 48%;display: inline-block">

                <div class="form-group form-inline">
                    <label class="col-md-3 col-form-label">产品编号:</label>
                    <div class="col-md-9 p-0">
                        <span id="bh" name="productId"></span>
                    </div>
                </div>

                <div class="form-group form-inline">
                    <label class="col-md-3 col-form-label">登记人:</label>
                    <div class="col-md-9 p-0">
                        <input class='form-control input-full' name="register" readonly>
                    </div>
                </div>

            </div>

            <table id="gxtab" class="table table-bordered table1">
                <tr>
                    <th>点选</th>
                    <th>工序名称</th>
                    <th>工序编号</th>
                    <th>描述</th>
                    <th>工时数</th>
                    <th>工时单位</th>
                    <th>单位工时成本</th>
                    <th>工时成本小计（元）</th>
                </tr>
            </table>
            <div style="width: 48%;display: inline-block">
                <input hidden="hidden" name="moduleCostPriceSum">
            </div>
            <div style="width: 48%;display: inline-block">
                <div class="form-group form-inline">
                    <label class="col-md-3 col-form-label">登记时间:</label>
                    <div class="col-md-9 p-0">
                        <span name="registerTime"></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text">设计要求:</span>
                    </div>
                    <textarea  id="comment" name="procedureDescribe" class="form-control" aria-label="With textarea" style="margin-top: 0px; margin-bottom: 0px; height: 90px;"></textarea>
                </div>
            </div>
        </form>

    </div>
</div>

<!-- 模态框 -->
<div class="modal fade" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">

            <!-- 模态框头部 -->
            <div class="modal-header">
                <h4 class="modal-title">添加工序</h4>
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>

            <!-- 模态框主体 -->
            <div class="modal-body">

                <table class="table table-bordered">
                    <tr>
                        <th>工序编号</th>
                        <th>工序名称</th>
                        <th>工序描述</th>
                        <th>添加</th>
                    </tr>
                    <tr>
                        <td>01</td>
                        <td>组装</td>
                        <td></td>
                        <td><a href="#" id="a1" >添加</a></td>
                    </tr>
                    <tr>
                        <td>02</td>
                        <td>测试</td>
                        <td></td>
                        <td><a href="#" id="a2">添加</a></td>
                    </tr>
                    <tr>
                        <td>03</td>
                        <td>包装</td>
                        <td></td>
                        <td><a href="#" id="a3">添加</a></td>
                    </tr>
                </table>
            </div>

            <!-- 模态框底部 -->
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
            </div>

        </div>
    </div>
</div>

<!--js用到的包，不够在自己添加-->
<script src="../js/jquery.3.2.1.min.js"></script>
<script src="../js/popper.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/bootstrap-table.min.js"></script>
<script src="../js/bootstrap-table-zh-CN.min.js"></script>
<script src="../js/common.js"></script>
<script src="js/scgxsjd.js"></script>

<script>
    var id = window.location.href.split("?")[1].split("=")[1];
    var cpmc = window.location.href.split("?")[2].split("=")[1];
    $("#name").html(decodeURI(cpmc))
    $("#bh").html(id)
    var date=new Date();
    var n=date.getFullYear();
    var y=date.getMonth()+1;
    var r=date.getDate();
    var s=date.getHours();
    var f=date.getMinutes();
    var m=date.getSeconds();
        var sj=n+"-0"+y+"-"+r+" "+s+":"+f+":"+m+"";
    $("[name=registerTime]").html(sj);
    $("[name=register]").val(parent.document.getElementsByClassName("user_name")[0].innerHTML);
</script>
</body>
</html>